<?php echo $this->error($this); ?>
<script type="text/javascript">
<!--
function checkName() {
	var spanError = document.getElementById('error');
	var checkRegExp = new RegExp("^[ \t]*$");
	var project = document.getElementById('project');
	if (project.projects_name.value.length == 0
		|| checkRegExp.test(project.projects_name.value)) {
		spanError.innerHTML = "<?php echo T_('Project\'s name empty, please fill it.'); ?>;"
		spanError.className = "usvn_error";
		return false;
	}
	spanError.innerHTML = '';
	spanError.className = "";
	return true;
}
-->
</script>
<form id="project" class="usvn_form" method="post" action="<?php echo $this->url; ?>">
	<fieldset>
		<legend><?php echo T_("Project's information"); ?></legend>
		<label><?php echo T_("Name"); ?><span class="usvn_require">*</span>:<br />
			<?php echo $this->formText('projects_name', $this->project->name, array('maxlength' => 255)); ?>
		</label>
		<br />
		<label><?php echo T_("Description"); ?>:<br />
			<?php echo $this->formTextarea('projects_description',$this->project->description, array('rows' => 8, 'cols' => 80)); ?>
		</label>
		<br />
        <?php
            if ($this->action == 'new' || $this->action == 'create') {
                echo '<label>' . T_('Create group for project:') . $this->formCheckbox('creategroup', 1) . '</label><br />';
                echo '<label>' . T_('Add me to project group:') . $this->formCheckbox('addmetogroup', 1) . '</label><br />';
                echo '<label>' . T_('Add me as admin of the project:') . $this->formCheckbox('admin', 1) . '</label><br />';
            }
        ?>
		<?php if (isset($this->group)) echo $this->formHidden('groups_id', $this->group->id); ?>
		<?php echo $this->formSubmit('submit', T_("Submit"), array("onclick" => 'return checkName();')); ?>
		<br />
	</fieldset>
</form>
<br />
